[insert_php] $livezillaURL = “http://www.hoyasupport.co.za/chat/”;
$apiURL = $livezillaURL . “api/v2/api.php”;

// authentication parameters
$postd[“p_user”]='{administrator}’;
$postd[“p_pass”]='{Am!kaJacobs1}’;

// function parameter
$postd[“p_operators_list”]=1;
$postd[“p_json_pretty”]=1;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$apiURL);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($postd));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);

if($server_output === false)
exit(curl_error($ch));

echo $server_output;
echo “


“;
curl_close($ch);

$response = json_decode($server_output);

if(count($response)==0)
exit(“No operators found”);

foreach($response->Operators as $obj)
{
if($obj->Operator->Status < 2 && !$obj->Operator->IsBot)
{
echo “Operator->PictureFile . “\”> “;
echo $obj->Operator->Fullname . ” is online “;
echo “Operator->ChatFile . “\” >Chat
“;
}
}

[/insert_php]